import { Tabs} from 'antd';
const A = () => {
    const onChange = (key: string) => {
        console.log(key);
      };
      
      const items: TabsProps['items'] = [
        {
          key: '1',
          label: '这是tab1',
          children: 'Content of Tab Pane 1',
        },
        {
          key: '2',
          label: '这是tab2',
          children: 'Content of Tab Pane 2',
        },
        {
          key: '3',
          label: '复杂的tab标题',
          children: 'Content of Tab Pane 3',
        },
      ];
    return <div><Tabs defaultActiveKey="1" items={items} onChange={onChange} /></div>;
};

export default A;